# 放开执行策略，使用Bypass可以不提示
Set-ExecutionPolicy Bypass
# 配置用户安装环境，也是Scoop安装目录
$env:SCOOP='D:\Scoop_Apps'
[environment]::setEnvironmentVariable('SCOOP',$env:SCOOP,'User')
# 配置全局安装环境
$env:SCOOP_GLOBAL='D:\Scoop_Global_Apps'
[environment]::setEnvironmentVariable('SCOOP_GLOBAL',$env:SCOOP_GLOBAL,'Machine')

# 国外源安装
# Invoke-WebRequest -useb get.scoop.sh | Invoke-Expression
# scoop update

# 国内源安装
Invoke-WebRequest -useb https://gitee.com/glsnames/scoop-installer/raw/master/bin/install.ps1 | Invoke-Expression
scoop config SCOOP_REPO 'https://gitee.com/glsnames/scoop-installer'
scoop update